package com.spddr.pmos.cxf.tree;

import java.util.Collection;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;

import com.spddr.pmos.domain.TreeLevel;

import cn.seqdata.pojo.TreeNode;

@Produces(MediaType.APPLICATION_JSON)
public interface JaxrsLevel<T> {
	@GET
	@Path("/")
	Collection<T> byLevel(@QueryParam("id") long id, @QueryParam("level") TreeLevel level);

	@GET
	@Path("/root")
	Collection<T> byRoot();

	@GET
	@Path("/grid/{grid}")
	Collection<T> byGrid(@PathParam("grid") long grid);

	@GET
	@Path("/company/{company}")
	Collection<T> byCompany(@PathParam("company") long company);

	@GET
	@Path("/customer/{customer}")
	Collection<T> byCustomer(@PathParam("customer") long customer);

	@GET
	@Path("/plant/{plant}")
	Collection<T> byPlant(@PathParam("plant") long plant);

	@GET
	@Path("/unit/{unit}")
	Collection<T> byUnit(@PathParam("unit") long unit);

	@GET
	@Path("/substation/{substation}")
	Collection<T> bySubstation(@PathParam("substation") long substation);

	@GET
	@Path("/transformer/{transformer}")
	Collection<TreeNode> byTransformer(long transformer);

	@GET
	@Path("/line/{line}")
	Collection<T> byLine(@PathParam("line") long line);

	@GET
	@Path("/transmission/{transmission}")
	Collection<T> byTransmission(@PathParam("transmission") long transmission);

	@GET
	@Path("/river/{river}")
	Collection<T> byRiver(@PathParam("river") long river);

	@GET
	@Path("/reservoir/{reservoir}")
	Collection<T> byReservoir(@PathParam("reservoir") long reservoir);

	@GET
	@Path("/usagepoint/{usagepoint}")
	Collection<T> byUsagePoint(@PathParam("usagepoint") long usagepoint);

	@GET
	@Path("/telemetry/{telemetry}")
	Collection<T> byTelemetry(@PathParam("telemetry") long telemetry);
}
